<template>
	<view>
		<div id="user_center">
			<!-- 跳转设置 -->
			<div class="user_header">	
					<a @click.stop="uni.navigateTo({url:'set_up'})">	
						<img class="set" src="https://yo.docshare.org.cn/static/images/set_up.png">	
					</a>
				<div class="pic">
					<a>						
						<img :src="getImgUrl(info.photo)" @click="uni.navigateTo({
							url:'avatar?url='+ `${config.baseUrl}`+info.photo
						})">	
					</a>
				</div>
				<div class="name">
					<label>{{info.name}}</label>
					<p>{{info.individualitysignature}}</p>
				</div>

				<div class="clear"></div>
			</div>
			
			<div class="user_nav">
				<div class="order_nav">
					<ul class="box_nav am-avg-sm-4">
						<li>
							<!-- 订单链接 -->
							<a title="" @click="uni.navigateTo({url:'./waitorder'})">	
								<img src="https://yo.docshare.org.cn/static/images/user_center_icon3.png" />
								<p>订单</p>
							</a>
						</li>
						<li>
							<!-- 便签链接 -->
							<a title="" @click="uni.navigateTo({url:'../../../pages/main/release'})">	
								<img src="https://yo.docshare.org.cn/static/images/user_center_icon1.png" />
								<p>便签</p>
							</a>
						</li>
						<li>
						<!-- 翻译链接 -->
							<a title="" @click="uni.navigateTo({url:'../../../pages/print'})">	
								<img src="https://yo.docshare.org.cn/static/images/print.png" />
								<p>涂鸦</p>
							</a>
						</li>
		
						<li>
							<!-- 天气链接 -->
						<a title="" @click="uni.navigateTo({url:'./weather'})">
							<img src="https://yo.docshare.org.cn/static/images/weather.png" />
							<p>天气</p>
						</a>
						</li>
						<div class="clear"></div>
					</ul>
				</div>
		
				<div class="data_nav">
					<ul class="am-avg-sm-2">
						<li>
							<a @click="uni.navigateTo({url:'../../../pages/main/trip_comment'})">
							<img src="https://yo.docshare.org.cn/static/images/aboutme.png"/>
							<p>与我相关</p>
							</a>
						</li>
						<li>
							<a @click="uni.navigateTo({url:'./sos'})">	
								<img src="https://yo.docshare.org.cn/static/images/sos.png" />
								<p>紧急求救</p>
							</a>
						</li>
					</ul>
				</div>
				<ul class="list_nav">
		
					<li>
						<a title="" @click="uni.navigateTo({url:'./soscard'})">	
							<img src="https://yo.docshare.org.cn/static/images/user_center_icon6.png">求助信息卡
							<!-- <i class="am-icon-angle-right"></i> -->
							<image src="https://yo.docshare.org.cn/static/tubiao/gengduo.png" mode="" style="width: 15px;height: 15px;"></image>
						</a>
					</li>
					<li>
						<a title="" @click="uni.navigateTo({url:'./box'})">	
							<img src="https://yo.docshare.org.cn/static/images/user_center_icon7.png">游记草稿箱
							<!-- <i class="am-icon-angle-right"></i> -->
							<image src="https://yo.docshare.org.cn/static/tubiao/gengduo.png" mode="" style="width: 15px;height: 15px;"></image>
						</a>
					</li>
				</ul>
			</div>
		</div>
		<!--footer-->
		<div id="footer">
			<div class="first">
				<ul class="am-avg-sm-2">
					<li>
						<a title="" @click="uni.navigateTo({url:'../../../pages/main/index'})">	
							<img src="https://yo.docshare.org.cn/static/images/icon-footer1-a.png" />
							<p>首页</p>
						</a>
					</li>
					<li>
						<a title="" @click="uni.navigateTo({url:'../../../pageA/pages/active/trip_list'})">	
							<img alt="" src="https://yo.docshare.org.cn/static/images/icon-footer4-a.png" />
							<p>活动</p>
						</a>
					</li>
				</ul>
			</div>
			<div class="beautiful">
				<a title="" @click="uni.navigateTo({url:'../../../pages/add/my_note'})">	
					<img alt="" src="https://yo.docshare.org.cn/static/images/icon-footer3-a.png" />
				</a>
			</div>
			<div class="last">
				<ul class="am-avg-sm-2">
					<li>
						<a title="" @click="uni.navigateTo({url:'../../../pages/map/map'})">	
							<img alt="" src="https://yo.docshare.org.cn/static/images/icon-footer2-a.png" />
							<p>地图</p>
						</a>
					</li>
					<li class="active">
						<a title="" @click="uni.navigateTo({url:''})">	
							<img alt="" src="https://yo.docshare.org.cn/static/images/icon-footer05-a.png" />
							<p>我的</p>
						</a>
					</li>
				</ul>
			</div>
		</div>
	</view>
</template>

<script>
	import config from '@/config'
	export default {
		data() {
			return {
				uni,
				config,
				info: {},
			}
		},
		methods: {
			getImgUrl:function(image){//获取图片，图片地址拼接函数
					return `${config.baseUrl}`+image;
				},
			onLoad:function(options){
				var that = this;
				uni.request({
					url: `${config.baseUrl}/my/info?token=`+uni.getStorageSync('token'),
					method: 'POST',
					success(r) {
						if (r.data.succ) {						
							that.info = r.data.data;
							console.log(r.data);
						} else {
			
						}
					}
				})
			},
			itemClicked: function(item, path) {
				uni.navigateTo({
					url: path + '?id=' + item.id
				})
			}
		},
	
}	
</script>

<style>

</style>
